import os, stat, time, sha, sys
import urllib

class SlideShareConf:
    def __init__(self):        
        self.api_key = '6CZm8RW7'
        self.secret_key = 'Pt176Bum'
        self.ts = int(time.time())        
        self.hash_key = sha.new(self.secret_key + str(self.ts)).hexdigest()       
        self.user_name = 'Your Slide Share User Name'
        self.password = 'Your Slide Share User Password'
        
    def getapikey(self):
        return self.api_key
           
    def getsecretkey(self):
        return self.secret_key
         
    def getusername(self):
        return self.user_name
        
    def getpassword(self):
        return self.password
    
    def getParamList(self,extParam,paramVal):
        if extParam != "":                  
            pramas = urllib.urlencode({'api_key': self.api_key, 'ts': self.ts, 'hash': self.hash_key, 'username': self.user_name, 'password': self.password, extParam:paramVal})
        else:
            pramas = urllib.urlencode({'api_key': self.api_key, 'ts': self.ts, 'hash': self.hash_key, 'username': self.user_name, 'password': self.password}) 
        return pramas